#include "RemoveRowNetworkEvent.h"
#include "Well.h"

RemoveRowNetworkEvent::RemoveRowNetworkEvent(long rowId)
{
    message.header.code = NetworkEvent::SERVER_REMOVE_ROW;
    message.header.sizeOfData = sizeof(message) - sizeof(message.header);
    message.data.rowId = rowId;
}

RemoveRowNetworkEvent::RemoveRowNetworkEvent(const Header& header, const Data& data)
{
    message.header = header;
    message.data = data;
}

RemoveRowNetworkEvent::~RemoveRowNetworkEvent()
{
}

void* RemoveRowNetworkEvent::getMessageBlob()
{
    return &message;
}

size_t RemoveRowNetworkEvent::getMessageBlobSize()
{
    return sizeof(message);
}

void RemoveRowNetworkEvent::visitWell(Well* well) const
{
    well->handleRemoveRowEvent(message.data.rowId);
}
